function entry_classify
fstr=fopen('str.bdf','r');
fgrid=fopen('grid.bdf','w');
fbar=fopen('bar.bdf','w');
fquad=fopen('quad.bdf','w');
ftria=fopen('tria.bdf','w');
fpenta=fopen('penta.bdf','w');
fhexa=fopen('hexa.bdf','w');
fproperty=fopen('property.bdf','w');
fmaterial=fopen('material_101.bdf','w');
frbe=fopen('rbe.bdf','w');
felse=fopen('else.bdf','w');
while feof(fstr)==0
    entry=fgetl(fstr);
    if length(entry)<2
        fprintf(felse,'%s\n',entry);
    elseif entry(1:2)=="GR"
        fprintf(fgrid,'%s\n',entry);
    elseif entry(1:2)=="CB"
        fprintf(fbar,'%s\n',entry);
    elseif entry(1:2)=="CQ"
        fprintf(fquad,'%s\n',entry);
    elseif entry(1:2)=="CT"
        fprintf(ftria,'%s\n',entry);
    elseif entry(1:2)=="CP"
        fprintf(fpenta,'%s\n',entry);
    elseif entry(1:2)=="CH"
        fprintf(fhexa,'%s\n',entry);
        last='H';
    elseif entry(1)=='P'
        fprintf(fproperty,'%s\n',entry);
        last='P';
    elseif entry(1)=='M'
        fprintf(fmaterial,'%s\n',entry);
    elseif entry(1)=='R'
        fprintf(frbe,'%s\n',entry);
        last='R';
    elseif entry(1)=='S'
        fprintf(felse,'%s\n',entry);
        last='S';
    elseif entry(1)=='+'
        if last=='P'
            fprintf(fproperty,'%s\n',entry);
        elseif last=='R'
            fprintf(frbe,'%s\n',entry);
        elseif last=='S'
            fprintf(felse,'%s\n',entry);
        elseif last=='H'
            fprintf(fhexa,'%s\n',entry);
        end
    else
        fprintf(felse,'%s\n',entry);
    end
end
fclose('all');
end